<?php

/**
* @copyright   (C) 2010 iJoomla, Inc. - All rights reserved.
* @license  GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html) 
* @author  iJoomla.com webmaster@ijoomla.com
* @url   http://www.ijoomla.com/licensing/
* the PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript  
* are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0 
* More info at http://www.ijoomla.com/licensing/
*/

	defined('_JEXEC') or die('Restricted Access');
	
	$published = "0";
	$show_on_results = "0";
	$ordering = "";
	$access = "1";
	$access_array = (object)array("access"=>$access);
	$created = date("Y-m-d");
	$published_up = date("Y-m-d");
	$published_down = "00-00-0000 00:00:00";
	
	if($this->values != ""){
		$published = $this->values["0"]["published"];
		$show_on_results = $this->values["0"]["show_on_results"];
		$ordering = $this->values["0"]["ordering"];
		$access = $this->values["0"]["access"];		
		$created = $this->values["0"]["created"];
		$published_up = $this->values["0"]["published_up"];
		$published_down = $this->values["0"]["published_down"];
	}
	$access_array = (object)array("access"=>$access);	
?>

<table width="100%" class="adminform">
	<tr>
		<td align="left" nowrap="nowrap" width="15%"><b><?php echo JText::_("COM_SURVEYS_PUBLISHED"); ?> :</b></td>
		<td align="left">
			<table>
				<tr>
					<td>
						<table>
							<tr>
								<td>					
									<input type="radio" name="published" value="1" <?php if($published == 1){ echo 'checked' ;} ?>/>
								</td>
								<td>	
									<?php echo JText::_("JYES"); ?>
								</td>
							</tr>
						</table>			
					</td>
					<td>
						<table>
							<tr>
								<td>	
									<input type="radio" name="published" value="0" <?php if($published == 0){ echo 'checked' ;} ?>/>
								</td>
								<td>	
									<?php echo JText::_("JNO"); ?>
								</td>
							</tr>
						</table>	
					</td>
				</tr>
			</table>			
		</td>		
	</tr>	
	<tr>
		<td align="left" nowrap="nowrap" width="15%"><b><?php echo JText::_("COM_SURVEYS_SHOW_ON_RESULTS"); ?> :</b></td>
		<td align="left">
			<table>
				<tr>
					<td>
						<table>
							<tr>
								<td>
									<input type="radio" name="show_on_results" value="1" <?php if($show_on_results == 1){echo 'checked';} ?>/>
								</td>
								<td>	
									<?php echo JText::_("JYES"); ?>
								</td>
							</tr>
						</table>						
					</td>
					<td>		
						<table>
							<tr>
								<td>
									<input type="radio" name="show_on_results" value="0" <?php if($show_on_results == 0){echo 'checked';} ?>/>
								</td>
								<td>	
									<?php echo JText::_("JNO"); ?>
								</td>
							</tr>
						</table>	
					</td>
				</tr>
			</table>			
		</td>		
	</tr>			
<!--	<tr>
		<td align="left" width="15%" nowrap="nowrap"><b><?php //echo JText::_("COM_SURVEYS_ORDERING"); ?> :</b></td>
		<td align="left" width="85%">
			<?php
				//echo $this->getOrdering($ordering);
			?>	
		</td>
	</tr> -->
	<tr>
		<td valign="top" align="left" nowrap="nowrap" width="15%">
			<b><?php echo JText::_("COM_SURVEYS_ACCESS_LEVEL"); ?>:</b>
		</td>
		<td>
			<?php echo JHTML::_('list.accesslevel', $access_array); ?> 
		</td>
	</tr>
	<tr>
		<td valign="top" align="left" nowrap="nowrap" width="15%">
			<b><?php echo JText::_("COM_SURVEYS_OVERRIDE_CREATED_DATE"); ?>:</b>
		</td>
		<td>
			<?php				
				echo JHTML::_('calendar', $created, 'created', 'created', "%Y-%m-%d", array('size'=>'25',  'maxlength'=>'19')); 
			?>			
		</td>
	</tr>
	<tr>		
		<td align="left" nowrap="nowrap"><b><?php echo JText::_("COM_SURVEYS_START_PUBLISHING"); ?>:</b></td>
		<td>
			<?php		
				echo JHTML::_('calendar', $published_up, 'published_up', 'published_up', "%Y-%m-%d", array('size'=>'25',  'maxlength'=>'19')); 
			?>			
		</td>
	</tr>
	<tr>
		<td align="left" nowrap="nowrap"><b><?php echo JText::_("COM_SURVEYS_FINISH_PUBLISHING"); ?>:</b></td>
		<td>
			<?php
				echo JHTML::_('calendar', $published_down, 'published_down', 'published_down', "%Y-%m-%d", array('size'=>'25',  'maxlength'=>'19')); 
			?>			
		</td>
	</tr>
</table>